package com.ptu.controller.admin;

import com.ptu.constant.JwtClaimsConstant;
import com.ptu.dto.UsersDTO;
import com.ptu.dto.UsersLoginDTO;
import com.ptu.entity.Users;
import com.ptu.properties.JwtProperties;
import com.ptu.result.Result;
import com.ptu.service.UsersService;
import com.ptu.utils.JwtUtil;
import com.ptu.vo.UsersLoginVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * 员工管理
 */
@RestController
@RequestMapping("/admin/user")
@Slf4j
@Api(tags = "用户登录相关接口")
public class UsersController {

    @Autowired
    private UsersService usersService;

    @GetMapping("/{id}")
    @ApiOperation("根据id查询用户")
    public Result<Users> getById(@PathVariable Long id){
        Users users = usersService.getById(id);
        return Result.success(users);
    }
}
